The demand for data storage has been rapidly escalating because, as the amount of data such as digital media stored by users grows, so does the need to store digital media reliably over extended periods of time. Traditional backup solutions periodically copy data to, for example, backup tapes, compact discs (CDs), or other local storage media. However, such solutions are not optimal because the backup media is stored in a single location, and the media being used for backup has typically been prone to failure.
Commercially available services that are referred to as cloud storage services (CSS) provide mass storage through a web service interface available through the Internet. The storage infrastructure includes a distributed array of geographically distributed data centers connected to a plurality of clients through a wide area network (WAN). A data center typically consists of servers and mass storage to facilitate cloud storage services to the clients. Such services enable applications including, for example, backup and restoration of data, data synchronization, file sharing, and so on.
Cloud storage services are accessible to users from anywhere in the world via a client implementing a web services' interface designed to at least synchronize data with the data centers. However, such web services fail to provide standard file sharing protocols (e.g., common internet file system (CIFS) or network file system (NFS)). In addition, the cost of accessing files stored in the cloud storage directly from the LAN is typically lower than accessing files on the same LAN that are simply stored in local storage devices.
In a cloud storage system, each tenant (i.e., a paying customer of a service) has a quota of resources which are allocated to a plurality of folders. Quota usage of a tenant is defined as the total amount of resources allocated to folders owned by the tenant (for example, resources may refer to one of more of: storage size in GB, a number of files owned by a tenant; an amount of storage consumed by a specific subset of the files matching a specific criteria, and so on). In current existing solutions, the quota is tracked by a per tenant quota usage counter. When data is stored to the system, the quota usage counter of the tenant is increased by the amount of resources to be consumed, before committing the stored data and sending an acknowledgement reply to the client. Similarly, when data is deleted from the system, the storage counter is decreased accordingly.
A flaw in the existing implementations is that the single quota counter of each tenant must be stored on a single quota tracking server, must be locked while it is being updated, and must be performed as a transaction together with the update of the metadata database. Furthermore, if the metadata database for tracking the cloud storage contents is separate from the quota tracking server, a very expensive two-phase commit operation is required for each storage operation.
Some existing implementations circumvent the performance limitations by compromising on the accuracy of the quota enforcement. As an example, in such implementations, a user may be allowed to allocate slightly more than that user's quota or, if some objects are deleted, the quota space will not be reclaimed immediately. However, in many cases, precise enforcement of quotas is desirable.
A network attached storage (NAS) device for performing NAS operations with cloud storage services is also discussed in the related art. Such a NAS device provides the functionality of data storage, file-based operations (e.g., read, write, delete, modify, etc.), and the management of these functionalities to clients on the network. Specifically, a client can store data in its local storage which is also synchronized with a cloud storage service. The client can access and perform file-based operations either on its local storage or the cloud storage service. An access to the files in the device is typically through a local area network, while access to the cloud storage system is through the Internet.
Such a NAS device that provides cloud storage services can be installed in organizations and enterprises, thereby allowing their users to save data locally to a storage device attached to the NAS device and/or to the cloud. An organization, enterprise, or other entity utilizing the cloud storage service is referred to as a tenant, i.e., a paying customer for the cloud storage services. Tenants may further include one or more users who are not necessarily paying customers themselves, yet may be provided access to the service to write, read, delete, or modify resources stored by the service.
As the cloud resource quota is typically priced by the total capacity assigned to each tenant (e.g., a size of Gigabytes, Terabytes, etc., such as, for example, 2 GB or 1 TB, a number of files, etc.), an enforcement mechanism is implemented to ensure that each tenant does not exceed the total capacity of its purchased quota. An exemplary enforcement mechanism includes assigning a tenant storage usage counter (TUC) for each tenant, and increasing the TUC when data is saved to a folder of tenant T; or decreasing the TUC when the data is deleted by each user of the tenant. When a user writes data to the cloud storage system, TUC is increased by the data's save size (for example, in Megabytes, Gigabytes, Terabytes, count of files, etc.) and compared to the resource quota of the tenant. If the value of the TUC would rise above the quota of the tenant, the write operation is denied. The TUC is locked for each write request from a user and unlocked after the request is approved or denied.
As multiple users can access the cloud storage system concurrently to write to their respective cloud folders, this enforcement mechanism results in lock contention. Lock contention occurs when one user attempts to access the content that is currently being locked by another user.
It would be therefore advantageous to provide an efficient and scalable enforcement mechanism for cloud storage systems.